package com.fuzongle.tenant.api;

import com.fuzongle.tenant.business.service.TenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @auther: fuzongle
 * @date: 2021-05-21
 * @description: 租户web数据层
 */
@RestController
@RequestMapping
public class TenantController {

    @Autowired
    private TenantService tenantService;

    /**
     * 新增数据
     */
    @PostMapping
    public  void insert(){
        tenantService.insert();

    }



    /**
     * 删除数据
     */
    @DeleteMapping
    public  void delete(){
        tenantService.delete();
    }

    /**
     * 修改数据
     */
    @PutMapping
    public  void update(){
        tenantService.update();
    }

    /**
     * 修改数据
     */
    @GetMapping
    public  Object select(){
        return tenantService.select();
    }


}
